<template>
	<view>
		<stop isBack>
			<view slot="content">维修任务取消</view>
		</stop>
		<view class="lh2 bcf pad2 mart3">
			<stextarea label="取消原因" placeholder="简单描述取消原因" v-model="tips"></stextarea>
		</view>
		<view class="lh2 bcf pad2 bdtso">
			<view class="tac pad2 line-green round cu-btn lg w100 mart5" @tap="submit">
				<view>提交</view>
				<ripple></ripple>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:0,
				user:'',
				tips:''
			}
		},
		methods: {
			submit(){
				if(!this.isbool(this.tips)){
					this.$com.showToast('请填写取消原因')
					return
				}
				this.$api.post('/api/user/machineFixOrders/' + this.id + '/cancel',{tips:this.tips},res=>{
					this.log(res)
					if(res.s == 1){
						this.$com.showToast(res.i)
						setTimeout(()=>{
							this.goback()
						},300)
					}
				})
			}
		},
		onLoad(option) {
			let id = option.id
			this.id = id
		}
	}
</script>

<style>

</style>
